#include "mainwindow.h"

#include <QDialog>
//#include <QPainter>
#include <QLabel>
#include <QMovie>
#include <QProgressBar>
#include <QPushButton>
#include <QDesktopWidget>
#include <QApplication>
#include <QRect>
#include <QToolBox>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QDebug>
//#include <QSize>
//#include <QDockWidget>
//#include <QTextEdit>

#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow) {
  ui->setupUi(this);

  QDesktopWidget* desktopWidget = QApplication::desktop();
  //获取设备屏幕大小
  QRect screenRect = desktopWidget->screenGeometry();
  int screenX = screenRect.width();          //桌面宽
  int screenY = screenRect.height();         //桌面长

  // setWindowTitle("长江计算机保密检查系统");   //主窗口标题
  setWindowTitle("   ");                     //主窗口标题
  setFixedSize(screenX*7/15, screenY*4/5);   //主窗口大小
  move(screenX*4/15, screenY/15);
  int mainX = screenX*7/15;                  //主窗口宽
  int mainY = screenY*4/5;                   //主窗口长

//  QDockWidget *dock = new QDockWidget(this);
//  addDockWidget(Qt::RightDockWidgetArea, dock);
//  QTextEdit *textEdit1= new QTextEdit(this);
//  dock->setWidget(textEdit1);

  //主窗口上半部分颜色1
  QWidget *mainwdw_up = new QWidget(this);
  mainwdw_up->setParent(this);
  mainwdw_up->setGeometry(0, 0, mainX, mainY*5/13);
  mainwdw_up->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_up->show();

  //主窗口分界部分颜色2
  QWidget *mainwdw_mid = new QWidget(this);
  mainwdw_mid->setParent(this);
  mainwdw_mid->setGeometry(0, mainY*5/13, mainX, mainY*5/12);
  mainwdw_mid->setStyleSheet("background-color:rgb(45,45,45)");
  mainwdw_mid->show();

  //主窗口下半部分颜色3
  QWidget *mainwdw_down = new QWidget(this);
  mainwdw_down->setParent(this);
  mainwdw_down->setGeometry(0, mainY*5/12, mainX, mainY);
  mainwdw_down->setStyleSheet("background-color:rgb(40,40,40)");
  mainwdw_down->show();

  // logo
  QPushButton *btn_logo = new QPushButton;
  btn_logo->setParent(this);
  btn_logo->setFixedSize(mainX*280/700, mainX*280/700);
  btn_logo->move(mainX*50/700, 0);
  btn_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/logo.png)}"});

  //欢迎字01
  QPushButton *btn01 = new QPushButton;
  btn01->setParent(this);
  btn01->setFixedSize(mainX*300/700, mainY*80/800);
  btn01->move(mainX*380/700, mainY*40/800);
  btn01->setText("保密千日，不松一时");
  btn01->setStyleSheet(
      QString{"QPushButton{font-size:25px;color:rgb(240,240,240);border:0px;"
              "background:none}"});  // font-family:\"KaiTi\";

  //欢迎字02
  QPushButton *btn02 = new QPushButton;
  btn02->setParent(this);
  btn02->move(mainX*430/700, mainY*80/800);
  btn02->setFixedSize(mainX*200/700, mainY*80/800);
  btn02->setText("欢迎使用 YUCC Inspector");  // Yangtze University Computer Confidentiality Inspector
  btn02->setStyleSheet(QString(
      "QPushButton{color:rgb(190,190,190);border:0px;background:none}"));

  //开始检测按钮00
  QPushButton *btn_start = new QPushButton;
  btn_start->setParent(this);
  btn_start->setFixedSize(mainX*160/700, mainY*80/800);
  btn_start->move(mainX*450/700, mainY*160/800);
  btn_start->setText("开始检查！");
  btn_start->setStyleSheet(
      QString("QPushButton{font-size:25px;"
              "background-color:rgb(150,230,150);"
              "border:8px ridge #99ff99;"
              "border-top-left-radius:16px;"
              "border-top-right-radius:16px;"
              "border-bottom-left-radius:16px;"
              "border-bottom-right-radius:16px}"
              "QPushButton:hover{font-size:23px;"
              "background-color:rgb(160,245,160);"
              "border:8px groove #99ff99;"
              "border-top-left-radius:16px;"
              "border-top-right-radius:16px;"
              "border-bottom-left-radius:16px;"
              "border-bottom-right-radius:16px}"));

  //常规检查按钮1
  QPushButton *btn_normal = new QPushButton;
  btn_normal->setText("常规检查");                          //按钮文本
  btn_normal->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_normal->setParent(this);
  btn_normal->move(mainX*115/700, mainY*335/800);         //按钮位置
  btn_normal->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //常规检查图片11
  QPushButton *btn_normal_img = new QPushButton;
  btn_normal_img->setParent(this);
  // btn_normal_img->setStyleSheet("border-image:url(:/new/prefix1/FloderClose.png)");
  btn_normal_img->setFixedSize(mainX*50/700, mainX*50/700);
  btn_normal_img->move(mainX*60/700, mainY*345/800);
  btn_normal_img->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/FileOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/FileClose.png)}"});

  //安全检查按钮2
  QPushButton *btn_security = new QPushButton;
  btn_security->setText("安全检查");                         //按钮文本
  btn_security->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_security->setParent(this);
  btn_security->move(mainX*465/700, mainY*335/800);         //按钮位置
  btn_security->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //安全检查图片22
  QPushButton *btn_security_img = new QPushButton;
  btn_security_img->setParent(this);
  // btn_security_img->setStyleSheet("border-image:url(:/new/prefix1/SafeClose.png)");
  btn_security_img->setFixedSize(mainX*50/700, mainX*50/700);
  btn_security_img->move(mainX*415/700, mainY*345/800);
  btn_security_img->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/SafeOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/SafeClose.png)}"});

  //文件检查按钮3
  QPushButton *btn_file = new QPushButton;
  btn_file->setText("文件检查");                         //按钮文本
  btn_file->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_file->setParent(this);
  btn_file->move(mainX*115/700, mainY*450/800);         //按钮位置115,450
  btn_file->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //文件检查图片33
  QPushButton *btn_file_img = new QPushButton;
  btn_file_img->setParent(this);
  // btn_file_img->setStyleSheet("border-image:url(:/new/prefix1/TextClose.png)");
  btn_file_img->setFixedSize(mainX*50/700, mainX*50/700);
  btn_file_img->move(mainX*60/700, mainY*460/800);
  btn_file_img->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/TextOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/TextClose.png)}"});

  //深度检查按钮4
  QPushButton *btn_deep = new QPushButton;
  btn_deep->setText("深度检查");    //按钮文本
  btn_deep->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_deep->setParent(this);
  btn_deep->move(mainX*465/700, mainY*450/800);  //按钮位置465,450
  btn_deep->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //深度检查图片43
  QPushButton *btn_deep_img = new QPushButton;
  btn_deep_img->setParent(this);
  // btn_deep_img->setStyleSheet("border-image:url(:/new/prefix1/TextClose.png)");
  btn_deep_img->setFixedSize(mainX*50/700, mainX*50/700);
  btn_deep_img->move(mainX*410/700, mainY*460/800);
  btn_deep_img->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/TextOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/TextClose.png)}"});

  //虚拟机检查按钮5
  QPushButton *btn_virmachine = new QPushButton;
  btn_virmachine->setText("虚拟机检查");    //按钮文本
  btn_virmachine->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_virmachine->setParent(this);
  btn_virmachine->move(mainX*115/700, mainY*565/800);  //按钮位置465,450
  btn_virmachine->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //邮箱检查按钮6
  QPushButton *btn_email = new QPushButton;
  btn_email->setText("邮箱检查");    //按钮文本
  btn_email->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_email->setParent(this);
  btn_email->move(mainX*465/700, mainY*565/800);  //按钮位置465,450
  btn_email->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //硬件检查按钮7
  QPushButton *btn_hard = new QPushButton;
  btn_hard->setText("深度检查");    //按钮文本
  btn_hard->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_hard->setParent(this);
  btn_hard->move(mainX*115/700, mainY*680/800);  //按钮位置465,450
  btn_hard->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //检查报告按钮8
  QPushButton *btn_report = new QPushButton;
  btn_report->setText("检查报告");    //按钮文本
  btn_report->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn_report->setParent(this);
  btn_report->move(mainX*465/700, mainY*680/800);  //按钮位置465,450
  btn_report->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //-------------------------------------------------------------------------------------------------------
  //“开始检查”窗口01（默认为常规检查）
  QDialog *dlg_start = new QDialog;
  dlg_start->setFixedSize(mainX, mainY);
  //dlg_start->move(screenX*4/15, screenY/15);
  dlg_start->move(screenX*4/15, screenY/15);

  connect(btn_start, &QPushButton::clicked, dlg_start, &QDialog::show);
  connect(btn_start, &QPushButton::clicked, this, &QMainWindow::close);

  //“开始检查”窗口01上半部分颜色0101
  QWidget *mainwdw_start_up = new QWidget;
  mainwdw_start_up->setParent(dlg_start);
  mainwdw_start_up->setGeometry(0, 0, mainX, mainY*200/800);
  mainwdw_start_up->setStyleSheet("background-color:rgb(40,40,40)");
  mainwdw_start_up->show();

  //“开始检查”窗口01分界部分颜色0102
  QWidget *mainwdw_start_mid = new QWidget;
  mainwdw_start_mid->setParent(dlg_start);
  mainwdw_start_mid->setGeometry(0, mainY*200/800, mainX, mainY*220/800);
  mainwdw_start_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_start_mid->show();

  //“开始检查”窗口01下半部分颜色0103
  QWidget *mainwdw_start_down = new QWidget;
  mainwdw_start_down->setParent(dlg_start);
  mainwdw_start_down->setGeometry(0, mainY*220/800, mainX, mainY*600/800);
  mainwdw_start_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_start_down->show();

  //进度上提示字符
  QPushButton *btn_start01 = new QPushButton;
  btn_start01->setParent(dlg_start);
  btn_start01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_start01->setText("检查出65535个项泽龙！建议立即清理");
  btn_start01->move(mainX*150/700, mainY*50/800);
  btn_start01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度条
  QProgressBar *qpb = new QProgressBar;
  qpb->setParent(dlg_start);
  qpb->move(mainX*175/700, mainY*120/800);
  qpb->setMaximum(100);
  qpb->setMinimum(0);
  qpb->setValue(90);
  //QString swidth = (QString)(mainX*400/700);
  //int swidth = mainX*400/700;
  qpb->setStyleSheet(
      QString{"QProgressBar{border:1px solid "
              "grey;border-radius:3px;background-color:transparent;text-align:"
              "center;qproperty-textVisible:false;height:20px;width:400px}"
              "QProgressBar::chunk{background-color:qlineargradient(x1:0,y1:0,"
              "x2:1,y2:0,stop:0 #B3E59E,stop:1.0 #83E800)}"});

  //进度下提示字符0103
  QPushButton *btn_start03 = new QPushButton;
  btn_start03->setParent(dlg_start);
  btn_start03->setFixedSize(mainX*400/700, mainY*80/800);
  btn_start03->setText("正在检测：/Users/linmuyu/Desktop/123.txt");
  btn_start03->move(mainX*105/700, mainY*120/800);
  btn_start03->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_start_logo = new QPushButton;
  btn_start_logo->setParent(dlg_start);
  btn_start_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_start_logo->move(mainX*30/700, mainY*30/800);
  btn_start_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // LOADING
  QLabel *qlb_start_loading = new QLabel;
  QMovie *mov_start_loading = new QMovie(":/new/prefix1/res/loading01.gif");
  qlb_start_loading->setFixedSize(mainX*100/700, mainY*100/800);
  QSize mov01load(qlb_start_loading->width(), qlb_start_loading->height());
  mov_start_loading->setScaledSize(mov01load);
  mov_start_loading->setParent(dlg_start);
  qlb_start_loading->setParent(dlg_start);
  qlb_start_loading->setMovie(mov_start_loading);
  qlb_start_loading->move(mainX*30/700, mainY*220/800);
  mov_start_loading->start();

  //返回主窗口0102
  QPushButton *btn_start_back = new QPushButton;
  btn_start_back->setParent(dlg_start);
  btn_start_back->move(mainX*600/700, mainY*111/800);
  btn_start_back->setText("返回");
  btn_start_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_start_back, &QPushButton::clicked, dlg_start, &QDialog::close);
  connect(btn_start_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“常规检查”窗口02
  QDialog *dlg_normal = new QDialog;
  dlg_normal->setFixedSize(mainX, mainY);
  dlg_normal->move(screenX*4/15, screenY/15);
  connect(btn_normal, &QPushButton::clicked, dlg_normal, &QDialog::show);
  connect(btn_normal, &QPushButton::clicked, this, &QMainWindow::close);

  //“常规检查”窗口02上半部分颜色0201
  QWidget *mainwdw_normal_up = new QWidget;
  mainwdw_normal_up->setParent(dlg_normal);
  mainwdw_normal_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_normal_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_normal_up->show();

  //“常规检查”窗口02分界部分颜色0202
  QWidget *mainwdw_normal_mid = new QWidget;
  mainwdw_normal_mid->setParent(dlg_normal);
  mainwdw_normal_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_normal_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_normal_mid->show();

  //“常规检查”窗口02下半部分颜色0203
  QWidget *mainwdw_normal_down = new QWidget;
  mainwdw_normal_down->setParent(dlg_normal);
  mainwdw_normal_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_normal_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_normal_down->show();

  //进度上提示字符0201
  QPushButton *btn_normal01 = new QPushButton;
  btn_normal01->setParent(dlg_normal);
  btn_normal01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_normal01->setText("常规检查已完成，用时一分三十秒");
  btn_normal01->move(mainX*150/700, mainY*10/800);
  btn_normal01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0202
  QPushButton *btn_normal02 = new QPushButton;
  btn_normal02->setParent(dlg_normal);
  btn_normal02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_normal02->setText("共检测文件65535项");
  btn_normal02->move(mainX*145/700, mainY*75/800);
  btn_normal02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_normal_logo = new QPushButton;
  btn_normal_logo->setParent(dlg_normal);
  btn_normal_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_normal_logo->move(mainX*30/700, mainY*10/800);
  btn_normal_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_normal_loading = new QLabel;
  QMovie *mov_normal_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_normal_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov02load(qlb_normal_loading->width(), qlb_normal_loading->height());
  mov_normal_loading->setScaledSize(mov02load);
  mov_normal_loading->setParent(dlg_normal);
  qlb_normal_loading->setParent(dlg_normal);
  qlb_normal_loading->setMovie(mov_normal_loading);
  qlb_normal_loading->move(mainX*195/700, mainY*75/800);
  mov_normal_loading->start();

  //返回主窗口0203
  QPushButton *btn_normal_back = new QPushButton;
  btn_normal_back->setParent(dlg_normal);
  btn_normal_back->move(mainX*600/700, mainY*71/800);
  btn_normal_back->setText("返回");
  btn_normal_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_normal_back, &QPushButton::clicked, dlg_normal, &QDialog::close);
  connect(btn_normal_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“安全检查”窗口03
  QDialog *dlg_security = new QDialog;
  dlg_security->setFixedSize(mainX, mainY);
  dlg_security->move(screenX*4/15, screenY/15);
  connect(btn_security, &QPushButton::clicked, dlg_security, &QDialog::show);
  connect(btn_security, &QPushButton::clicked, this, &QMainWindow::close);

  //“安全检查”窗口03上半部分颜色0301
  QWidget *mainwdw_security_up = new QWidget;
  mainwdw_security_up->setParent(dlg_security);
  mainwdw_security_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_security_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_security_up->show();

  //“安全检查”窗口03分界部分颜色0302
  QWidget *mainwdw_securit_mid = new QWidget;
  mainwdw_securit_mid->setParent(dlg_security);
  mainwdw_securit_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_securit_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_securit_mid->show();

  //“安全检查”窗口03下半部分颜色0103
  QWidget *mainwdw_securit_down = new QWidget;
  mainwdw_securit_down->setParent(dlg_security);
  mainwdw_securit_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_securit_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_securit_down->show();

  //进度上提示字符0301
  QPushButton *btn_securit01 = new QPushButton;
  btn_securit01->setParent(dlg_security);
  btn_securit01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_securit01->setText("安全检查已完成，用时一分三十秒");
  btn_securit01->move(mainX*150/700, mainY*10/800);
  btn_securit01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0302
  QPushButton *btn_securit02 = new QPushButton;
  btn_securit02->setParent(dlg_security);
  btn_securit02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_securit02->setText("共检测文件65535项");
  btn_securit02->move(mainX*145/700, mainY*75/800);
  btn_securit02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_securit_logo = new QPushButton;
  btn_securit_logo->setParent(dlg_security);
  btn_securit_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_securit_logo->move(mainX*30/700, mainY*10/800);
  btn_securit_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_securit_loading = new QLabel;
  QMovie *mov_securit_loading = new QMovie(":/new/prefix/res/succeed.gif");
  qlb_securit_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov03load(qlb_securit_loading->width(), qlb_securit_loading->height());
  mov_securit_loading->setScaledSize(mov03load);
  mov_securit_loading->setParent(dlg_security);
  qlb_securit_loading->setParent(dlg_security);
  qlb_securit_loading->setMovie(mov_securit_loading);
  qlb_securit_loading->move(mainX*195/700, mainY*75/800);
  mov_securit_loading->start();

  //返回主窗口0303
  QPushButton *btn_securit_back = new QPushButton;
  btn_securit_back->setParent(dlg_security);
  btn_securit_back->move(mainX*600/700, mainY*71/800);
  btn_securit_back->setText("返回");
  btn_securit_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_securit_back, &QPushButton::clicked, dlg_security, &QDialog::close);
  connect(btn_securit_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“文件检查”窗口04
  QDialog *dlg_file = new QDialog;
  dlg_file->setFixedSize(mainX, mainY);
  dlg_file->move(screenX*4/15, screenY/15);
  connect(btn_file, &QPushButton::clicked, dlg_file, &QDialog::show);
  connect(btn_file, &QPushButton::clicked, this, &QMainWindow::close);

  //“文件检查”窗口04上半部分颜色0401
  QWidget *mainwdw_file_up = new QWidget;
  mainwdw_file_up->setParent(dlg_file);
  mainwdw_file_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_file_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_file_up->show();

  //“文件检查”窗口04分界部分颜色0402
  QWidget *mainwdw_file_mid = new QWidget;
  mainwdw_file_mid->setParent(dlg_file);
  mainwdw_file_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_file_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_file_mid->show();

  //“文件检查”窗口04下半部分颜色0403
  QWidget *mainwdw_file_down = new QWidget;
  mainwdw_file_down->setParent(dlg_file);
  mainwdw_file_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_file_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_file_down->show();

  //进度上提示字符0401
  QPushButton *btn_file01 = new QPushButton;
  btn_file01->setParent(dlg_file);
  btn_file01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_file01->setText("文件检查已完成，用时一分三十秒");
  btn_file01->move(mainX*150/700, mainY*10/800);
  btn_file01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0402
  QPushButton *btn_file02 = new QPushButton;
  btn_file02->setParent(dlg_file);
  btn_file02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_file02->setText("共检测文件65535项");
  btn_file02->move(mainX*145/700, mainY*75/800);
  btn_file02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_file_logo = new QPushButton;
  btn_file_logo->setParent(dlg_file);
  btn_file_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_file_logo->move(mainX*30/700, mainY*10/800);
  btn_file_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_file_loading = new QLabel;
  QMovie *mov_file_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_file_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov04load(qlb_file_loading->width(), qlb_file_loading->height());
  mov_file_loading->setScaledSize(mov04load);
  mov_file_loading->setParent(dlg_file);
  qlb_file_loading->setParent(dlg_file);
  qlb_file_loading->setMovie(mov_file_loading);
  qlb_file_loading->move(mainX*195/700, mainY*75/800);
  mov_file_loading->start();

  //返回主窗口0403
  QPushButton *btn_file_back = new QPushButton;
  btn_file_back->setParent(dlg_file);
  btn_file_back->move(mainX*600/700, mainY*71/800);
  btn_file_back->setText("返回");
  btn_file_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_file_back, &QPushButton::clicked, dlg_file, &QDialog::close);
  connect(btn_file_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“深度检查”窗口05
  QDialog *dlg_deep = new QDialog;
  dlg_deep->setFixedSize(mainX, mainY);
  dlg_deep->move(screenX*4/15, screenY/15);
  connect(btn_deep, &QPushButton::clicked, dlg_deep, &QDialog::show);
  connect(btn_deep, &QPushButton::clicked, this, &QMainWindow::close);

  //“深度检查”窗口05上半部分颜色0501
  QWidget *mainwdw_deep_up = new QWidget;
  mainwdw_deep_up->setParent(dlg_deep);
  mainwdw_deep_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_deep_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_deep_up->show();

  //“深度检查”窗口05分界部分颜色0502
  QWidget *mainwdw_deep_mid = new QWidget;
  mainwdw_deep_mid->setParent(dlg_deep);
  mainwdw_deep_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_deep_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_deep_mid->show();

  //“深度检查”窗口05下半部分颜色0503
  QWidget *mainwdw_deep_down = new QWidget;
  mainwdw_deep_down->setParent(dlg_deep);
  mainwdw_deep_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_deep_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_deep_down->show();

  //进度上提示字符0501
  QPushButton *btn_deep01 = new QPushButton;
  btn_deep01->setParent(dlg_deep);
  btn_deep01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_deep01->setText("深度检查已完成，用时一分三十秒");
  btn_deep01->move(mainX*150/700, mainY*10/800);
  btn_deep01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符05025
  QPushButton *btn_deep02 = new QPushButton;
  btn_deep02->setParent(dlg_deep);
  btn_deep02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_deep02->setText("共检测文件65535项");
  btn_deep02->move(mainX*145/700, mainY*75/800);
  btn_deep02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_deep_logo = new QPushButton;
  btn_deep_logo->setParent(dlg_deep);
  btn_deep_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_deep_logo->move(mainX*30/700, mainY*10/800);
  btn_deep_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_deep_loading = new QLabel;
  QMovie *mov_deep_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_deep_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov05load(qlb_deep_loading->width(), qlb_deep_loading->height());
  mov_deep_loading->setScaledSize(mov05load);
  mov_deep_loading->setParent(dlg_deep);
  qlb_deep_loading->setParent(dlg_deep);
  qlb_deep_loading->setMovie(mov_deep_loading);
  qlb_deep_loading->move(mainX*195/700, mainY*75/800);
  mov_deep_loading->start();

  //返回主窗口0503
  QPushButton *btn_deep_back = new QPushButton;
  btn_deep_back->setParent(dlg_deep);
  btn_deep_back->move(mainX*600/700, mainY*71/800);
  btn_deep_back->setText("返回");
  btn_deep_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_deep_back, &QPushButton::clicked, dlg_deep, &QDialog::close);
  connect(btn_deep_back, &QPushButton::clicked, this, &QMainWindow::show);
  //-------------------------------------------------------------------------------------------------------
  //“虚拟机检查”窗口06
  QDialog *dlg_virmachine = new QDialog;
  dlg_virmachine->setFixedSize(mainX, mainY);
  dlg_virmachine->move(screenX*4/15, screenY/15);
  connect(btn_virmachine, &QPushButton::clicked, dlg_virmachine, &QDialog::show);
  connect(btn_virmachine, &QPushButton::clicked, this, &QMainWindow::close);

  //“虚拟机检查”窗口06上半部分颜色0601
  QWidget *mainwdw_virmachine_up = new QWidget;
  mainwdw_virmachine_up->setParent(dlg_virmachine);
  mainwdw_virmachine_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_virmachine_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_virmachine_up->show();

  //“虚拟机检查”窗口06分界部分颜色0602
  QWidget *mainwdw_virmachine_mid = new QWidget;
  mainwdw_virmachine_mid->setParent(dlg_virmachine);
  mainwdw_virmachine_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_virmachine_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_virmachine_mid->show();

  //“虚拟机检查”窗口06下半部分颜色0603
  QWidget *mainwdw_virmachine_down = new QWidget;
  mainwdw_virmachine_down->setParent(dlg_virmachine);
  mainwdw_virmachine_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_virmachine_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_virmachine_down->show();

  //进度上提示字符0601
  QPushButton *btn_virmachine01 = new QPushButton;
  btn_virmachine01->setParent(dlg_virmachine);
  btn_virmachine01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_virmachine01->setText("虚拟机检查已完成，用时一分三十秒");
  btn_virmachine01->move(mainX*150/700, mainY*10/800);
  btn_virmachine01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0602
  QPushButton *btn_virmachine02 = new QPushButton;
  btn_virmachine02->setParent(dlg_virmachine);
  btn_virmachine02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_virmachine02->setText("共检测文件65535项");
  btn_virmachine02->move(mainX*145/700, mainY*75/800);
  btn_virmachine02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_virmachine_logo = new QPushButton;
  btn_virmachine_logo->setParent(dlg_virmachine);
  btn_virmachine_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_virmachine_logo->move(mainX*30/700, mainY*10/800);
  btn_virmachine_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_virmachine_loading = new QLabel;
  QMovie *mov_virmachine_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_virmachine_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov06load(qlb_virmachine_loading->width(), qlb_virmachine_loading->height());
  mov_virmachine_loading->setScaledSize(mov06load);
  mov_virmachine_loading->setParent(dlg_virmachine);
  qlb_virmachine_loading->setParent(dlg_virmachine);
  qlb_virmachine_loading->setMovie(mov_virmachine_loading);
  qlb_virmachine_loading->move(mainX*195/700, mainY*75/800);
  mov_virmachine_loading->start();

  //返回主窗口0603
  QPushButton *btn_virmachine_back = new QPushButton;
  btn_virmachine_back->setParent(dlg_virmachine);
  btn_virmachine_back->move(mainX*600/700, mainY*71/800);
  btn_virmachine_back->setText("返回");
  btn_virmachine_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_virmachine_back, &QPushButton::clicked, dlg_virmachine, &QDialog::close);
  connect(btn_virmachine_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“邮箱检查”窗口07
  QDialog *dlg_email = new QDialog;
  dlg_email->setFixedSize(mainX, mainY);
  dlg_email->move(screenX*4/15, screenY/15);
  connect(btn_email, &QPushButton::clicked, dlg_email, &QDialog::show);
  connect(btn_email, &QPushButton::clicked, this, &QMainWindow::close);

  //“邮箱检查”窗口07上半部分颜色0701
  QWidget *mainwdw_email_up = new QWidget;
  mainwdw_email_up->setParent(dlg_email);
  mainwdw_email_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_email_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_email_up->show();

  //“邮箱检查”窗口07分界部分颜色0702
  QWidget *mainwdw_email_mid = new QWidget;
  mainwdw_email_mid->setParent(dlg_email);
  mainwdw_email_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_email_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_email_mid->show();

  //“邮箱检查”窗口07下半部分颜色0703
  QWidget *mainwdw_email_down = new QWidget;
  mainwdw_email_down->setParent(dlg_email);
  mainwdw_email_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_email_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_email_down->show();

  //进度上提示字符0701
  QPushButton *btn_email01 = new QPushButton;
  btn_email01->setParent(dlg_email);
  btn_email01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_email01->setText("邮箱检查已完成，用时一分三十秒");
  btn_email01->move(mainX*150/700, mainY*10/800);
  btn_email01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0702
  QPushButton *btn_email02 = new QPushButton;
  btn_email02->setParent(dlg_email);
  btn_email02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_email02->setText("共检测文件65535项");
  btn_email02->move(mainX*145/700, mainY*75/800);
  btn_email02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_email_logo = new QPushButton;
  btn_email_logo->setParent(dlg_email);
  btn_email_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_email_logo->move(mainX*30/700, mainY*10/800);
  btn_email_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_email_loading = new QLabel;
  QMovie *mov_email_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_email_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov07load(qlb_email_loading->width(), qlb_email_loading->height());
  mov_email_loading->setScaledSize(mov07load);
  mov_email_loading->setParent(dlg_email);
  qlb_email_loading->setParent(dlg_email);
  qlb_email_loading->setMovie(mov_email_loading);
  qlb_email_loading->move(mainX*195/700, mainY*75/800);
  mov_email_loading->start();

  //返回主窗口0703
  QPushButton *btn_email_back = new QPushButton;
  btn_email_back->setParent(dlg_email);
  btn_email_back->move(mainX*600/700, mainY*71/800);
  btn_email_back->setText("返回");
  btn_email_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_email_back, &QPushButton::clicked, dlg_email, &QDialog::close);
  connect(btn_email_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“硬件检查”窗口08
  QDialog *dlg_hard = new QDialog;
  dlg_hard->setFixedSize(mainX, mainY);
  dlg_hard->move(screenX*4/15, screenY/15);
  connect(btn_hard, &QPushButton::clicked, dlg_hard, &QDialog::show);
  connect(btn_hard, &QPushButton::clicked, this, &QMainWindow::close);

  //“硬件检查”窗口08上半部分颜色0801
  QWidget *mainwdw_hard_up = new QWidget;
  mainwdw_hard_up->setParent(dlg_hard);
  mainwdw_hard_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_hard_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_hard_up->show();

  //“硬件检查”窗口08分界部分颜色0802
  QWidget *mainwdw_hard_mid = new QWidget;
  mainwdw_hard_mid->setParent(dlg_hard);
  mainwdw_hard_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_hard_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_hard_mid->show();

  //“硬件检查”窗口08下半部分颜色0803
  QWidget *mainwdw_hard_down = new QWidget;
  mainwdw_hard_down->setParent(dlg_hard);
  mainwdw_hard_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_hard_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_hard_down->show();

  //进度上提示字符0801
  QPushButton *btn_hard01 = new QPushButton;
  btn_hard01->setParent(dlg_hard);
  btn_hard01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_hard01->setText("硬件检查已完成，用时一分三十秒");
  btn_hard01->move(mainX*150/700, mainY*10/800);
  btn_hard01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0802
  QPushButton *btn_hard02 = new QPushButton;
  btn_hard02->setParent(dlg_hard);
  btn_hard02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_hard02->setText("共检测文件65535项");
  btn_hard02->move(mainX*145/700, mainY*75/800);
  btn_hard02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_hard_logo = new QPushButton;
  btn_hard_logo->setParent(dlg_hard);
  btn_hard_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_hard_logo->move(mainX*30/700, mainY*10/800);
  btn_hard_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_hard_loading = new QLabel;
  QMovie *mov_hard_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_hard_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov08load(qlb_hard_loading->width(), qlb_hard_loading->height());
  mov_hard_loading->setScaledSize(mov08load);
  mov_hard_loading->setParent(dlg_hard);
  qlb_hard_loading->setParent(dlg_hard);
  qlb_hard_loading->setMovie(mov_hard_loading);
  qlb_hard_loading->move(mainX*195/700, mainY*75/800);
  mov_hard_loading->start();

  //返回主窗口0803
  QPushButton *btn_hard_back = new QPushButton;
  btn_hard_back->setParent(dlg_hard);
  btn_hard_back->move(mainX*600/700, mainY*71/800);
  btn_hard_back->setText("返回");
  btn_hard_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_hard_back, &QPushButton::clicked, dlg_hard, &QDialog::close);
  connect(btn_hard_back, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“检查报告”窗口09
  QDialog *dlg_report = new QDialog;
  dlg_report->setFixedSize(mainX, mainY);
  dlg_report->move(screenX*4/15, screenY/15);
  connect(btn_report, &QPushButton::clicked, dlg_report, &QDialog::show);
  connect(btn_report, &QPushButton::clicked, this, &QMainWindow::close);

  //“检查报告”窗口09上半部分颜色0901
  QWidget *mainwdw_report_up = new QWidget;
  mainwdw_report_up->setParent(dlg_report);
  mainwdw_report_up->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw_report_up->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw_report_up->show();

  //“检查报告”窗口09分界部分颜色0902
  QWidget *mainwdw_report_mid = new QWidget;
  mainwdw_report_mid->setParent(dlg_report);
  mainwdw_report_mid->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw_report_mid->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw_report_mid->show();

  //“检查报告”窗口09下半部分颜色0903
  QWidget *mainwdw_report_down = new QWidget;
  mainwdw_report_down->setParent(dlg_report);
  mainwdw_report_down->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw_report_down->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw_report_down->show();

  //进度上提示字符0901
  QPushButton *btn_report01 = new QPushButton;
  btn_report01->setParent(dlg_report);
  btn_report01->setFixedSize(mainX*400/700, mainY*80/800);
  btn_report01->setText("检查报告已完成，用时一分三十秒");
  btn_report01->move(mainX*150/700, mainY*10/800);
  btn_report01->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0902
  QPushButton *btn_report02 = new QPushButton;
  btn_report02->setParent(dlg_report);
  btn_report02->setFixedSize(mainX*400/700, mainY*80/800);
  btn_report02->setText("共检测文件65535项");
  btn_report02->move(mainX*145/700, mainY*75/800);
  btn_report02->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn_report_logo = new QPushButton;
  btn_report_logo->setParent(dlg_report);
  btn_report_logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn_report_logo->move(mainX*30/700, mainY*10/800);
  btn_report_logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb_report_loading = new QLabel;
  QMovie *mov_report_loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb_report_loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov09load(qlb_report_loading->width(), qlb_report_loading->height());
  mov_report_loading->setScaledSize(mov09load);
  mov_report_loading->setParent(dlg_report);
  qlb_report_loading->setParent(dlg_report);
  qlb_report_loading->setMovie(mov_report_loading);
  qlb_report_loading->move(mainX*195/700, mainY*75/800);
  mov_report_loading->start();

  //返回主窗口0903
  QPushButton *btn_report_back = new QPushButton;
  btn_report_back->setParent(dlg_report);
  btn_report_back->move(mainX*600/700, mainY*71/800);
  btn_report_back->setText("返回");
  btn_report_back->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn_report_back, &QPushButton::clicked, dlg_report, &QDialog::close);
  connect(btn_report_back, &QPushButton::clicked, this, &QMainWindow::show);

  ////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  class ToolBox_normal:public QToolBox{

//  public:
//      ToolBox_normal(QWidget *parent) : QToolBox(parent){
//          normal_UI();
//          connect(this, &QToolBox::currentChanged, this, &ToolBox_normal::onCurrentChanged);
//      }
//private:
//      void normal_UI(){
//          struct Info{
//              QString InfoName;
//          } Info[4][8]=
//          {
//            {
//                {QString("主机信息")},
//                {QString("硬盘信息")},
//                {QString("操作系统")},
//                {QString("身份鉴别")},
//                {QString("屏幕保护")},
//                {QString("无线通信")},
//                {QString("音频视频")},
//                {QString("开机关机")},
//            },
//            {
//                {QString("手机插拔记录")},
//                {QString("常规存储记录")},
//                {QString("无限蓝牙红外")},
//                {QString("其他USB设备")},
//            },
//            {
//                {QString("浏览器记录")},
//                {QString("软件上网记录")},
//                {QString("Cookies记录")},
//                {QString("邮件收发记录")},
//                {QString("终端外联状态")},
//                {QString("收藏夹记录")},
//            },
//            {
//                {QString("系统软件")},
//                {QString("镜像软件")},
//            }
//          };
//          QStringList normal_list;
//          normal_list << QStringList("终端基本信息") << QStringList("USB设备检查") << QStringList("联网记录检查") << QStringList("终端软件检查");

//          // 初始化列表
//                  for (unsigned long i = 0; i < sizeof(Info)/sizeof(Info[0]); i++)
//                  {
//                      QGroupBox *pGroupBox = new QGroupBox(this);
//                      QVBoxLayout *pLayout = new QVBoxLayout(pGroupBox);

//                      // 添加好友
//                      for (unsigned long j = 0; j < sizeof(Info[0])/sizeof(Info[0][0]); ++j)
//                      {
//                          QWidget *pWidget = initWidget(Info[i][j].InfoName);
//                          pLayout->addWidget(pWidget);
//                      }
//                      pLayout->addStretch();
//                      pLayout->setSpacing(10);
//                      pLayout->setContentsMargins(10, 10, 10, 10);

//                      // 添加分组
//                      addItem(pGroupBox, normal_list.at(i));
//                  }
//      }

//      QWidget* initWidget(const QString &name) {
//              QWidget *pWidget = new QWidget(this);
////              QLabel *pPixmapLabel = new QLabel(this);
//              QLabel *pNameLabel = new QLabel(this);
////              QLabel *pDescLabel = new QLabel(this);

//              // 图像 名称 描述
////              pPixmapLabel->setPixmap(QPixmap(icon));
//              pNameLabel->setText(name);
////              pDescLabel->setText(desc);

//              // VIP名字为红色；否则，白色
////              pNameLabel->setStyleSheet(QString("color: %1;").arg(bVIP ? "rgb(240, 30, 40)" : "white"));
////              pDescLabel->setStyleSheet("color: gray;");

//              QVBoxLayout *pVLayout = new QVBoxLayout();
//              pVLayout->addStretch();
//              pVLayout->addWidget(pNameLabel);
////              pVLayout->addWidget(pDescLabel);
//              pVLayout->addStretch();
//              pVLayout->setSpacing(5);
//              pVLayout->setContentsMargins(0, 0, 0, 0);

//              QHBoxLayout *pHLayout = new QHBoxLayout();
////              pHLayout->addWidget(pPixmapLabel);
//              pHLayout->addLayout(pVLayout);
//              pHLayout->addStretch();
//              pHLayout->setContentsMargins(0, 0, 0, 0);

//              pWidget->setLayout(pHLayout);

//              return pWidget;

//  }
//  private slots:
//      void onCurrentChanged(int index) {
//          QString strGroup = itemText(index);
//          qDebug() << strGroup;
//      }
//    };

}

MainWindow::~MainWindow() { delete ui; }
